#include<iostream>
#include"Server.hpp"

int main()
{
    Server server;
    std::cout<<"Pos1"<<std::endl;
    server.Open();
    std::cout<<"Pos2"<<std::endl;
    std::string Message;
    while(true)
    {
        if(server.ReciveMessage(&Message)>0)
        {
            std::cout<<"Client Send Message:"<<Message<<std::endl;
        }
        //没有消息发来
        else 
        {
            break;
        }
        std::cout<<"Pos3"<<std::endl;
    }
    std::cout << "client quit, me too!" << std::endl;
    server.Close();
    return 0;
}